using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;using Maxleaf.EDI.Domain.K3;

namespace Maxleaf.EDI.DataAccess.K3
{
    public class t_BASE_ObjectInUsedMap : EntityTypeConfiguration<t_BASE_ObjectInUsed>
    {
        public t_BASE_ObjectInUsedMap()
        {
            // Primary Key
            this.HasKey(t => t.FID);

            // Properties
            this.Property(t => t.FTable)
                .IsRequired()
                .HasMaxLength(2000);

            this.Property(t => t.FColumn)
                .IsRequired()
                .HasMaxLength(50);

            this.Property(t => t.FDescription)
                .IsRequired()
                .HasMaxLength(1000);

            this.Property(t => t.FDescription_cht)
                .IsRequired()
                .HasMaxLength(1000);

            this.Property(t => t.FDescription_en)
                .IsRequired()
                .HasMaxLength(2000);

            // Table & Column Mappings
            this.ToTable("t_BASE_ObjectInUsed");
            this.Property(t => t.FID).HasColumnName("FID");
            this.Property(t => t.FObjectType).HasColumnName("FObjectType");
            this.Property(t => t.FItemClassID).HasColumnName("FItemClassID");
            this.Property(t => t.FTable).HasColumnName("FTable");
            this.Property(t => t.FColumn).HasColumnName("FColumn");
            this.Property(t => t.FDescription).HasColumnName("FDescription");
            this.Property(t => t.FDescription_cht).HasColumnName("FDescription_cht");
            this.Property(t => t.FDescription_en).HasColumnName("FDescription_en");
            this.Property(t => t.FOrder).HasColumnName("FOrder");
            this.Property(t => t.FSystemType).HasColumnName("FSystemType");
        }
    }
}
